﻿using Kenly.DBFramework.Reflection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections;
using System.Collections.Generic;
using System;

namespace Kenly.DBFramework.Tests
{
    
    
    /// <summary>
    ///这是 EntityUtilityTest 的测试类，旨在
    ///包含所有 EntityUtilityTest 单元测试
    ///</summary>
    [TestClass()]
    public class EntityUtilityTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///获取或设置测试上下文，上下文提供
        ///有关当前测试运行及其功能的信息。
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region 附加测试属性
        // 
        //编写测试时，还可使用以下属性:
        //
        //使用 ClassInitialize 在运行类中的第一个测试前先运行代码
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //使用 ClassCleanup 在运行完类中的所有测试后再运行代码
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //使用 TestInitialize 在运行每个测试前先运行代码
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //使用 TestCleanup 在运行完每个测试后运行代码
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///ShadowCopy 的测试
        ///</summary>
        [TestMethod()]
        public void ShadowCopyTest1()
        {
            //object targetEntity = null; // TODO: 初始化为适当的值
            //object sourceEntity = null; // TODO: 初始化为适当的值
            //EntityUtility.ShadowCopy(targetEntity, sourceEntity);
            //Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///Inherit 的测试
        ///</summary>
        public void InheritTest3Helper<T>()
        {
            //IList entities = null; // TODO: 初始化为适当的值
            //List<T> expected = null; // TODO: 初始化为适当的值
            //List<T> actual;
            //actual = EntityUtility.Inherit<T>(entities);
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("验证此测试方法的正确性。");
        }

        [TestMethod()]
        public void InheritTest3()
        {
            //InheritTest3Helper<GenericParameterHelper>();
        }

        /// <summary>
        ///Inherit 的测试
        ///</summary>
        public void InheritTest2Helper<TInput, TOutput>()
        {
            //TInput baseEntity = default(TInput); // TODO: 初始化为适当的值
            //Converter<TInput, TOutput> converter = null; // TODO: 初始化为适当的值
            //TOutput expected = default(TOutput); // TODO: 初始化为适当的值
            //TOutput actual;
            //actual = EntityUtility.Inherit<TInput, TOutput>(baseEntity, converter);
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("验证此测试方法的正确性。");
        }

        [TestMethod()]
        public void InheritTest2()
        {
            //InheritTest2Helper<GenericParameterHelper, GenericParameterHelper>();
        }

        /// <summary>
        ///Inherit 的测试
        ///</summary>
        public void InheritTest1Helper<T>()
        {
            //object entity = null; // TODO: 初始化为适当的值
            //T expected = default(T); // TODO: 初始化为适当的值
            //T actual;
            //actual = EntityUtility.Inherit<T>(entity);
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("验证此测试方法的正确性。");
        }

        [TestMethod()]
        public void InheritTest1()
        {
            //InheritTest1Helper<GenericParameterHelper>();
        }

        /// <summary>
        ///Inherit 的测试
        ///</summary>
        public void InheritTestHelper<TInput, TOutput>()
        {
            //IList<TInput> baseEntities = null; // TODO: 初始化为适当的值
            //Converter<TInput, TOutput> converter = null; // TODO: 初始化为适当的值
            //List<TOutput> expected = null; // TODO: 初始化为适当的值
            //List<TOutput> actual;
            //actual = EntityUtility.Inherit<TInput, TOutput>(baseEntities, converter);
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("验证此测试方法的正确性。");
        }

        [TestMethod()]
        public void InheritTest()
        {
            //InheritTestHelper<GenericParameterHelper, GenericParameterHelper>();
        }

        /// <summary>
        ///ShadowCopy 的测试
        ///</summary>
        [TestMethod()]
        public void ShadowCopyTest()
        {
            //IList targetEntities = null; // TODO: 初始化为适当的值
            //IList sourceEntities = null; // TODO: 初始化为适当的值
            //EntityUtility.ShadowCopy(targetEntities, sourceEntities);
            //Assert.Inconclusive("无法验证不返回值的方法。");
        }
    }
}
